﻿using System;
using wojilu.ORM;

namespace wojilu.Apps.Qycms.Domain
{
    [Table("ybb_form_group")]
    [Serializable]
    public class Form_Group : ObjectBase<Form_Group>
    {
        [NotNull(""), Default(50), Column(Length = 6)]
        public Int32 pid { get; set; }

        [Column(Length = 50), NotNull(""), Default("")]
        public String lng { get; set; }

        [Column(Length = 200), NotNull(""), Default("")]
        public String formgroupname { get; set; }

        [Column(Length = 80), NotNull(""), Default("")]
        public String formcode { get; set; }

        [LongText]
        public String content { get; set; }

        [LongText]
        public String successtext { get; set; }

        [Column(Length = 150), NotNull("")]
        public String template { get; set; }

        [Column(Length = 100), NotNull(""), Default("")]
        public String emailatt { get; set; }

        [NotNull("")]
        public DateTime addtime { get; set; }

        [TinyInt, Column(Length = 1), NotNull(""), Default(1)]
        public Int32 isclass { get; set; }

        [TinyInt, Column(Length = 1), NotNull(""), Default(0)]
        public Int32 ismenu { get; set; }

        [TinyInt, Column(Length = 1), NotNull(""), Default(1)]
        public Int32 isseccode { get; set; }

        [TinyInt, Column(Length = 1), NotNull(""), Default(0)]
        public Int32 ismail { get; set; }

        [Column(Length = 100)]
        public String mailcode { get; set; }

        [Column(Length = 100)]
        public String putmail { get; set; }

        [Column(Length = 11), NotNull(""), Default(0)]
        public Int32 inputtime { get; set; }

        [TinyInt, Column(Length = 1), NotNull(""), Default(0)]
        public Int32 purview { get; set; }

        [TinyInt, Column(Length = 1), NotNull(""), Default(0)]
        public Int32 issms { get; set; }

        [Column(Length = 100)]
        public String smscode { get; set; }

        [NotSave]
        public String glink
        {
            get
            {
                return strUtil.Join(sys.Path.Root, "Form/List/" + Id);
            }
        }

    }
}
